import request from '@/utils/request'

// sku列表接口
export const reqSkuList = (page, limit) => request({
    url: `/index/admin/product/list/${page}/${limit}`,
    method: 'get'
})

// 上架 改接口（ok）
// /api/product/spuinfo/{}/up
export const reqSale = (skuId) => request({
    // url: `/index/admin/product/onSale/${skuId}`,
    url: `/index/api/product/spuinfo/${skuId}/up`,
    method: 'get'
})

// 下架 (删)
export const reqCancel = (skuId) => request({
    url: `/index/admin/product/cancelSale/${skuId}`,
    method: 'get'
})

// 获取sku详情
export const reqSkuById = (skuId) => request({
    url: `/index/admin/product/getSkuById/${skuId}`,
    method: 'get'
})
